<template>
	<div>
		<el-button @click="onHovertitles(row)" v-if="row.slave_name" :color="data[row.slave_colour]?.color" size="small" plain>
			{{row.slave_name}}
		</el-button>
	</div>
</template>
<!-- 从属设备改颜色 -->
<script lang="ts" setup>
	const emit = defineEmits(['onHovertitles'])
	const props = defineProps([
		'row',
	])
	const data = ref([
		{
			color: '#fff',
			id: 0
		},
		{
			color: '#ECB361',
			id: 1
		},
		{
			color: '#67C23A',
			id: 2
		},
		{
			// color: '#F56C6C',
            color: '#E82DA3',
			id: 3
 
		},
        //高扬添加
        {
            // color: '#F56C6C',
            color: '#E82DA3',
			id: 4 
        }
	])
	const onHovertitles = (row : any) => {
		emit('onHovertitles', row)
	}
</script>

<style>
</style>